import java.io.*;
import java.util.*;

public class Colleges{

	public static void main (String[] args)
	{
			try{
			System.out.println("[ED]");
			BufferedReader br = new BufferedReader(new FileReader("Colleges.txt"));
			String line = br.readLine();
			while (line != null)
				{
					if (line.contains("[ED]"))
						{
						int index = line.indexOf('[');
						line = line.substring(0, index);
						System.out.println(line);
						}
					line = br.readLine();
				}
			}
			catch(Exception e)
			{
			}
			
			try{
			System.out.println("");
			System.out.println("");
			System.out.println("[EA]");
			BufferedReader br = new BufferedReader(new FileReader("Colleges.txt"));
			String line = br.readLine();
			while (line != null)
				{
					if (line.contains("[EA]"))
						{
						int index = line.indexOf('[');
						line = line.substring(0, index);
						System.out.println(line);
						}
					line = br.readLine();
				}
			}
			catch(Exception e)
			{
			}
			
	}
	
	}